#! /usr/bin/env python
# encoding: utf-8

def build(ctx):
    ctx.shlib(target     = 'zcmjni',
              use        = ['default', 'zcm', 'JAVA'], # JAVA here for jni dep tracking
              source     = ctx.path.ant_glob('jni/*.c'))

    ctx(name       = 'zcmjar',
        features   = 'javac jar',
        srcdir     = ['zcm'],
        outdir     = 'classes',  # path to output (for .class)
        basedir    = 'classes',  # basedir for jar
        destfile   = 'zcm.jar')

    ctx.install_as('${PREFIX}/share/java/zcm.jar', 'zcm.jar')
